package com.gtxy.yyf.doris.exception;

/**
 * @PackageName: com.gtxy.yyf.doris.common.exception
 * @author: youjp
 * @slogan: 天下风云出我辈，一入代码岁月催
 * @create: 2022-06-10 15:10
 * @description: 异常统一处理
 * @Version: 1.0
 */
public class GenericException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private int code;
    private String msg;

    public GenericException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public GenericException(String message, int code, String msg) {
        super(message);
        this.code = code;
        this.msg = msg;
    }

    public GenericException(String message) {
        super(message);
    }

    public GenericException(String message, Throwable cause, int code, String msg) {
        super(message, cause);
        this.code = code;
        this.msg = msg;
    }

    public GenericException(String message, Throwable cause) {
        super(message, cause);
    }

    public GenericException(Throwable cause, int code, String msg) {
        super(cause);
        this.code = code;
        this.msg = msg;
    }

    public GenericException(Throwable cause) {
        super(cause);
    }

    public GenericException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, int code, String msg) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.code = code;
        this.msg = msg;
    }

    public GenericException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}

